let state = {
    desgin: 750,
    device: {
        width: 0,
        height: 0,
    },
    scene: {
        width: 330,
        height: 520
    },
  //isExit  0  未登录
  loginState:{
      isExit:0,
      uid:'',
      token:'',
  },
  company_id:'',
  partScholl:{
      defaultIcon:0
  }
}

let getters = {
    ratio(state) {
        return state.scene.width / state.scene.height
    }
}

let mutations = {
  setpartDefault(state,payload){
    state.partScholl.defaultIcon =payload
    // console.log(state,payload)
  },
    appSetDevice(state, device) {
      // console.log(state)
      // console.log(device)
        state.device = device
    },
  changeLoginStatus(state,payload){
      // console.log(payload)
      state.loginState.isExit =payload.isExit
  },
  saveUid(state,payload){
    // console.log(state,payload)
    state.loginState.uid =payload.uid
    state.loginState.token =payload.token
  },
  getUserCompanyId(state,payload){
    state.company_id =payload.company_id
  }
}

let actions = {}

export default {
    state,
    getters,
    mutations,
    actions
}
